<template>
  <div class="newsinfo">
    <van-panel
      :title="list.zhaiyao"
      :status="'阅读'+list.click"
    >
      <div>{{list.content}}</div>
    </van-panel>
    <comment :id='id'></comment>
  </div>
</template>
<script>
import comment from '../../../../components/common'
export default {
  name: 'NewsInfo',
  data: () => ({
    id: '',
    list: {}
  }),
  created() {
    this.id = this.$route.params.id
    this.getNewsInfo()
  },
  methods: {
    async getNewsInfo() {
      const res = await this.$http.getNewsInfo(this.id)
      this.list = res.message
    }
  },
  components: {
    comment
  }
}
</script>
<style lang="scss" scoped>
.newsinfo {
  .van-cell-group {
    background-color: #fff;
    padding: 0 5px;
  }
  .van-cell {
    height: 42px;
  }
  .van-cell__title {
    font-size: 14px;
    font-weight: 600;
    flex: none;
  }
  .van-panel__content {
    font-size: 12px;
    text-indent: 2.5em;
    line-height: 18px;
  }
  .van-cell__value {
    span {
      font-size: 0.32rem;
      color: red;
    }
  }
}
</style>
